package desarrollo;

import java.awt.*;
import java.awt.event.*;

public class LineaAwt {

    static dibujo d;

    public static void main(String args[]) {
        Frame f = new Frame("LineaAwt");
        final TextField tf = new TextField("      ");
        final TextField tf1 = new TextField("      ");
        Panel p = new Panel();
        d = new dibujo();
        Label l = new Label("X");
        Label l1 = new Label("Y");
        f.add(BorderLayout.SOUTH, p);
        p.add(l);
        p.add(tf);
        f.add(BorderLayout.CENTER, d);
        p.add(l1);
        p.add(tf1);
        d.addMouseListener(new MouseAdapter() {

            public void mouseClicked(MouseEvent e) {
                d.addpunto(e.getX(), e.getY());
            }
        });
        f.add(d);
        f.setSize(300, 200);
        f.setLocation(100, 200);
        f.setVisible(true);
    }
}
